package org.dromara.netbar.domain.vo;

import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.netbar.domain.NetbarProduct;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 商品信息视图对象 netbar_product
 *
 * @author ZhouWenTao
 * @date 2025-08-21
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = NetbarProduct.class)
public class NetbarProductVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 商品ID
     */
    @ExcelProperty(value = "商品ID")
    private Long productId;

    /**
     * 商品名称
     */
    @ExcelProperty(value = "商品名称")
    private String productName;

    /**
     * 商品编码
     */
    @ExcelProperty(value = "商品编码")
    private String productCode;

    /**
     * 条形码
     */
    @ExcelProperty(value = "条形码")
    private String barcode;

    /**
     * 分类ID
     */
    @ExcelProperty(value = "分类ID")
    private Long categoryId;

    /**
     * 品牌
     */
    @ExcelProperty(value = "品牌")
    private String brand;

    /**
     * 规格描述
     */
    @ExcelProperty(value = "规格描述")
    private String spec;

    /**
     * 库存
     */
    private Integer stock;
    /**
     * 单位
     */
    @ExcelProperty(value = "单位")
    private String unit;

    /**
     * 图片
     */
    @ExcelProperty(value = "图片")
    private String image;

    /**
     * 图片Url
     */
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "image")
    private String imageUrl;
    /**
     * 销售价
     */
    @ExcelProperty(value = "销售价")
    private Long salePrice;

    /**
     * 成本价
     */
    @ExcelProperty(value = "成本价")
    private Long costPrice;

    /**
     * 重量(kg)
     */
    @ExcelProperty(value = "重量(kg)")
    private Long weight;

    /**
     * 状态（0上架 1下架）
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=上架,1=下架")
    private String status;


}
